package com.company.cloud.coupon.modules.app.service;

import java.math.BigDecimal;
import java.util.List;

import com.company.cloud.common.bean.LoginSimpleUserInfo;
import com.company.cloud.coupon.modules.api.request.CouponOrderItem;
import com.company.cloud.coupon.modules.app.controller.req.CouponListByOrderParam;
import com.company.cloud.coupon.modules.base.entity.CouponInfo;
import com.company.cloud.coupon.modules.cache.models.CouponModel;
import com.company.cloud.coupon.modules.mgr.controller.req.CouponSendParam;
import com.company.cloud.coupon.modules.mgr.controller.req.CouponUseParam;

public interface CouponService {
	
	/**领取优惠券*/
	public CouponInfo collectCoupon(Integer userId, Integer couponConfigId, LoginSimpleUserInfo userInfo);
	
	/**领取优惠券*/
	public CouponInfo collectCoupon(Integer userId, Integer couponConfigId, String relType,
                                    Integer relId, boolean isMaxFund, LoginSimpleUserInfo userInfo) ;
	
	/**发放优惠券*/
	public void sendCoupon(CouponSendParam params, LoginSimpleUserInfo userInfo);
	
	/**使用优惠券*/
	public void useCouponByScan(CouponUseParam params, LoginSimpleUserInfo userInfo);
	/**根据订单查询我可使用的优惠券*/
	public List<CouponModel> getMyCouponByOrder(CouponListByOrderParam params, LoginSimpleUserInfo userInfo);
	/**计算优惠券使用金额*/
	public BigDecimal calCouponFund(CouponInfo coupon, List<CouponOrderItem> items);
	
	
	
	
}
